package com.bkgy.modular.acidRolling.controller;

import com.alibaba.fastjson.JSONObject;
import com.bkgy.modular.acidRolling.service.AcidRillingService;
import com.bkgy.sys.common.entity.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ZhuHongKai
 * @version 1.0
 * @ClassName AcidRilling
 * @date 2022/12/30 9:24
 * 酸轧弹窗
 */
@RestController
@RequestMapping("/AcidRilling")
public class AcidRillingController {

    @Resource
    private AcidRillingService acidRillingService;

    @PostMapping("/findMongodb")
    public ResultData findByMongodb(@RequestBody JSONObject jsonObject) {
        String volumeNo = jsonObject.getString("volumeNo");
        return acidRillingService.findByMongoDBData(volumeNo);
    }

    @PostMapping("/findByMongodb")
    public ResultData findMongdb(@RequestBody JSONObject jsonObject) {
        String volumeNo = jsonObject.getString("volumeNo");
        return acidRillingService.findMongdb(volumeNo);
    }
}
